package com.atguigu.test.mvc.properties;

import com.sun.corba.se.spi.orbutil.threadpool.ThreadPool;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * @author zp
 * @version 1.0
 * @description: 自定义线程的配置属性类
 * @date 2023/2/6 19:19
 */
@ConfigurationProperties(prefix = "my.thread")
public class MyThreadProperties {
    private int corePoolSize;
    private int maximumPoolSize;
    private long keepAliveTime;

    public int getCorePoolSize() {
        return corePoolSize;
    }

    public void setCorePoolSize(int corePoolSize) {
        this.corePoolSize = corePoolSize;
    }

    public int getMaximumPoolSize() {
        return maximumPoolSize;
    }

    public void setMaximumPoolSize(int maximumPoolSize) {
        this.maximumPoolSize = maximumPoolSize;
    }

    public long getKeepAliveTime() {
        return keepAliveTime;
    }

    public void setKeepAliveTime(long keepAliveTime) {
        this.keepAliveTime = keepAliveTime;
    }


    @Override
    public String toString() {
        return "MyThreadProperties{" +
                "corePoolSize=" + corePoolSize +
                ", maximumPoolSize=" + maximumPoolSize +
                ", keepAliveTime=" + keepAliveTime +
                '}';
    }
}
